package com.yang.jpa.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity(name = "check_attendance_sheet")
@EntityListeners(AuditingEntityListener.class)
public class CheckAttendanceSheet {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    private Integer attendanceSheetId;
    private Integer attendanceSheetState;
    private int pass;
    @CreatedDate
    private Date createdAt;
    @CreatedDate
    @LastModifiedDate
    private Date updatedAt;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getAttendanceSheetId() {
        return attendanceSheetId;
    }

    public void setAttendanceSheetId(Integer attendanceSheetId) {
        this.attendanceSheetId = attendanceSheetId;
    }

    public Integer getAttendanceSheetState() {
        return attendanceSheetState;
    }

    public void setAttendanceSheetState(Integer attendanceSheetState) {
        this.attendanceSheetState = attendanceSheetState;
    }

    public int getPass() {
        return pass;
    }

    public void setPass(int pass) {
        this.pass = pass;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }
}
